package behavioral.chainOfResponsibility;

public class WebServer {
    private final Handler handler;

    public WebServer(Handler handler) {
        this.handler = handler;
    }

    public void handleRequest(HttpRequest request) {
        if (handler != null) {
            handler.handle(request);
        } else {
            System.out.println("No handler available for the request.");
        }
    }
}
